package health

import (
	"gitcode.com/G-YT/ANN/server/api/v1"
	"gitcode.com/G-YT/ANN/server/middleware"
	"github.com/gin-gonic/gin"
)

type FdEfficacyRouter struct {
}

// InitFdEfficacyRouter 初始化 功效 路由信息
func (s *FdEfficacyRouter) InitFdEfficacyRouter(Router *gin.RouterGroup) {
	fdEfficacyRouter := Router.Group("fdEfficacy").Use(middleware.OperationRecord())
	fdEfficacyRouterWithoutRecord := Router.Group("fdEfficacy")
	var fdEfficacyApi = v1.ApiGroupApp.HealthApiGroup.FdEfficacyApi
	{
		fdEfficacyRouter.POST("createFdEfficacy", fdEfficacyApi.CreateFdEfficacy)             // 新建功效
		fdEfficacyRouter.DELETE("deleteFdEfficacy", fdEfficacyApi.DeleteFdEfficacy)           // 删除功效
		fdEfficacyRouter.DELETE("deleteFdEfficacyByIds", fdEfficacyApi.DeleteFdEfficacyByIds) // 批量删除功效
		fdEfficacyRouter.PUT("updateFdEfficacy", fdEfficacyApi.UpdateFdEfficacy)              // 更新功效
		fdEfficacyRouter.POST("setFdEfficacyGraphic", fdEfficacyApi.SetFdEfficacyGraphic)     // 设置功效文章关系
		fdEfficacyRouter.GET("getFdEfficacyGraphic", fdEfficacyApi.GetFdEfficacyGraphic)      // 获取功效文章关系
	}
	{
		fdEfficacyRouterWithoutRecord.GET("findFdEfficacy", fdEfficacyApi.FindFdEfficacy)       // 根据ID获取功效
		fdEfficacyRouterWithoutRecord.GET("getFdEfficacyList", fdEfficacyApi.GetFdEfficacyList) // 获取功效列表
	}
}
